<?php 

Util::tsRegisterAssetJs('formInscripcion.js')
?>

<div
    class="form">
    <?php
    
    /** @var ParticipanteController $this */
    /** @var Participante $model */
    /** @var AweActiveForm $form */
    $form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
    'id' => 'participante-form',
    'enableAjaxValidation' => false,
        'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false,),
        'enableClientValidation' => true,
    )); ?>

    <p class="note">
        <?php echo Yii::t('AweCrud.app', 'Fields with') ?> <span class="required">*</span>
        <?php echo Yii::t('AweCrud.app', 'are required') ?>.    </p>

    <?php echo $form->errorSummary($model) ?>

                    <?php echo $form->textFieldRow($model, 'cedula') ?>
                        <?php echo $form->textFieldRow($model, 'nombres', array('maxlength' => 50)) ?>
                        <?php echo $form->textFieldRow($model, 'apellidos', array('maxlength' => 50)) ?>
                        <?php echo $form->textFieldRow($model, 'telefono') ?>
                        <?php echo $form->textFieldRow($model, 'email', array('maxlength' => 50)) ?>
                        <?php echo $form->dropDownListRow($model, 'instruccion', array('PROFESIONAL INTERNO' => 'PROFESIONAL INTERNO','PROFESIONAL EXTERNO' => 'PROFESIONAL EXTERNO','ESTUDIANTE INTERNO' => 'ESTUDIANTE INTERNO','ESTUDIANTE EXTERNO' => 'ESTUDIANTE EXTERNO','OTROS' => 'OTROS',)) ?>
                        <?php echo$form->dropDownListRow ($escuela, 'id', array('' => ' -- Seleccione -- ') + CHtml::listData(Escuela::model()->findAll(), 'id', Escuela::representingColumn())) ?>
                         <?php echo$form->dropDownListRow ($carrera, 'id', array('' => ' -- Seleccione -- ') + CHtml::listData(Carrera::model()->findAll(), 'id', Carrera::representingColumn()),
                                 array(
                     'empty'=>array(''=>'- Seleccione -'),
                    'disabled'=>true,
                    'ajax' => array('type' => 'POST',
                    'url' => Yii::app()->baseUrl . '/index.php/participantes/Participante/CargarCarrera',
                    'update' => '#Carrera_id',
                    
                    ),
                   
                    
                )
                                 ) ?>
                <div class="form-actions">
                <?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
		)); ?>
        <?php $this->widget('bootstrap.widgets.TbButton', array(
			//'buttonType'=>'submit',
			'label'=> Yii::t('AweCrud.app', 'Cancel'),
			'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
		)); ?>
    </div>

    <?php $this->endWidget(); ?>
</div>